package com.yungu.swift.system.finance.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.yungu.swift.base.ResponseData;
import com.yungu.swift.base.mapper.IMapper;
import com.yungu.swift.base.service.impl.BaseServiceImpl;
import com.yungu.swift.system.finance.dao.FinanceJoinRefundMapper;
import com.yungu.swift.system.finance.model.dto.FinanceJoinRefundDto;
import com.yungu.swift.system.finance.service.FinanceJoinRefundService;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * FinanceRefundServiceImpl
 **/
@Service
public class FinanceJoinRefundServiceImpl extends BaseServiceImpl<FinanceJoinRefundDto> implements FinanceJoinRefundService {

    @Autowired
    private FinanceJoinRefundMapper financeRefundMapper;

    @Override
    protected IMapper<FinanceJoinRefundDto> getMapper() {
        return financeRefundMapper;
    }


    @Override
    public ResponseData<FinanceJoinRefundDto> queryByOrderUuid(String orderUuid) {
        return ResponseData.buildSuccessResponse(financeRefundMapper.queryByOrderUuid(orderUuid));
    }

    @Override
    public ResponseData<Long> countByOrderUuid(String orderUuid) {
        return ResponseData.buildSuccessResponse(financeRefundMapper.countByOrderUuid(orderUuid));
    }
}